﻿using project.B12.Model.BaseModel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Model.Models
{
    /// <summary>
    /// 菌数据库
    /// </summary>
    [SugarTable("TB_medicine")]
    [TenantAttribute("0")]//对应ConfigId
    public class Table_medicine : AggregateRootEntity

    {
        public Table_medicine() { }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 药中文名称
        /// </summary>
        private string _cN_Name;
        [SugarColumn(IsNullable = true)]
        public string CN_Name
        {
            get { return _cN_Name; }
            set { _cN_Name = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 药英文名称
        /// </summary>
        private string _eN_Name;
        [SugarColumn(IsNullable = true)]
        public string EN_Name
        {
            get { return _eN_Name; }
            set
            {
                _eN_Name = value; this.RaisePropertyChanged();
            }
        }


        /// <summary>
        /// 药简称
        /// </summary>
        private string _abbreviation;
        [SugarColumn(IsNullable = true)]
        public string Abbreviation
        {
            get { return _abbreviation; }
            set
            {
                _abbreviation = value; this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 是否删除
        /// </summary>
        private bool _isDelete;
        [SugarColumn(IsNullable = true)]
        public bool IsDelete
        {
            get { return _isDelete; }
            set
            {
                _isDelete = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 是否已修改
        /// </summary>
        private bool isUpdate;
        [SugarColumn(IsIgnore = true)]
        public bool IsUpdate
        {
            get { return isUpdate; }
            set
            {
                isUpdate = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// false 表示需要添加
        /// </summary>
        private bool isAdd;
        [SugarColumn(IsIgnore = true)]
        public bool IsAdd
        {
            get { return isAdd; }
            set
            {
                isAdd = value;
                this.RaisePropertyChanged();
            }
        }
    }
}
